package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DataProjectMapper;
import com.ruoyi.system.domain.DataProject;
import com.ruoyi.system.service.IDataProjectService;

/**
 * 项目管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-13
 */
@Service
public class DataProjectServiceImpl implements IDataProjectService 
{
    @Autowired
    private DataProjectMapper dataProjectMapper;

    /**
     * 查询项目管理
     * 
     * @param projectId 项目管理主键
     * @return 项目管理
     */
    @Override
    public DataProject selectDataProjectByProjectId(Long projectId)
    {
        return dataProjectMapper.selectDataProjectByProjectId(projectId);
    }

    /**
     * 查询项目管理列表
     * 
     * @param dataProject 项目管理
     * @return 项目管理
     */
    @Override
    public List<DataProject> selectDataProjectList(DataProject dataProject)
    {
        return dataProjectMapper.selectDataProjectList(dataProject);
    }

    /**
     * 新增项目管理
     * 
     * @param dataProject 项目管理
     * @return 结果
     */
    @Override
    public int insertDataProject(DataProject dataProject)
    {
        dataProject.setCreateTime(DateUtils.getNowDate());
        return dataProjectMapper.insertDataProject(dataProject);
    }

    /**
     * 修改项目管理
     * 
     * @param dataProject 项目管理
     * @return 结果
     */
    @Override
    public int updateDataProject(DataProject dataProject)
    {
        dataProject.setUpdateTime(DateUtils.getNowDate());
        return dataProjectMapper.updateDataProject(dataProject);
    }

    /**
     * 批量删除项目管理
     * 
     * @param projectIds 需要删除的项目管理主键
     * @return 结果
     */
    @Override
    public int deleteDataProjectByProjectIds(Long[] projectIds)
    {
        return dataProjectMapper.deleteDataProjectByProjectIds(projectIds);
    }

    /**
     * 删除项目管理信息
     * 
     * @param projectId 项目管理主键
     * @return 结果
     */
    @Override
    public int deleteDataProjectByProjectId(Long projectId)
    {
        return dataProjectMapper.deleteDataProjectByProjectId(projectId);
    }

    @Override
    public List<DataProject>selectAllDataProjectList()
    {
        return dataProjectMapper.selectAllDataProjectList();
    }
}
